dfcc6e2fd544afae91e098e619aaf8739e4afb11,src/main/java/org/jenkinsci/plugins/github/config/HookSecretConfig.java,DescriptorImpl,doFillCredentialsIdItems,#,59
Before Change
}
return new StandardListBoxModel()
.withEmptySelection()
.withAll(lookupCredentials(
StringCredentials.class,
Jenkins.getInstance(),
ACL.SYSTEM,
Collections.<DomainRequirement>emptyList())
);
}
}
}
After Change
@SuppressWarnings("unused")
public ListBoxModel doFillCredentialsIdItems(@QueryParameter String credentialsId) {
if (!Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER)) {
return new StandardListBoxModel().includeCurrentValue(credentialsId);
}
return new StandardListBoxModel()
.includeEmptyValue()
.includeMatchingAs(
ACL.SYSTEM,
Jenkins.getInstance(),
StringCredentials.class,
Collections.<DomainRequirement>emptyList(),
CredentialsMatchers.always()
);
}
}
}